<?php

require_once("functions.php");

if(!isset($_GET['id'])) {
	header("Location: index.php");
	exit();
} else {
	$sql[]="DELETE FROM games WHERE bowler_id={$_GET['id']}";
	$sql[]="DELETE FROM bowlers WHERE id={$_GET['id']}";
	$db=connectDB();
	foreach($sql as $cmd) {
		$db->query($cmd);
	}
	$db->disconnect();
	header("Location: index.php");
	exit();
}
?>
